// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.neuronbit.businessflow.intellij.editor;

import com.intellij.DynamicBundle;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;

import java.util.function.Supplier;

/**
 * The type Ui designer bundle.
 */
public final class UIDesignerBundle {
  private static final @NonNls String BUNDLE = "messages.UIDesignerBundle";
  private static final DynamicBundle INSTANCE = new DynamicBundle(UIDesignerBundle.class, BUNDLE);

  private UIDesignerBundle() {
  }

    /**
     * Message string.
     *
     * @param key    the key
     * @param params the params
     * @return the string
     */
    public static @NotNull @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
    return INSTANCE.getMessage(key, params);
  }

    /**
     * Message pointer supplier.
     *
     * @param key    the key
     * @param params the params
     * @return the supplier
     */
    public static @NotNull Supplier<@Nls String> messagePointer(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object @NotNull ... params) {
    return INSTANCE.getLazyMessage(key, params);
  }
}
